/* 首页 */

import axios from './axios'

// 天气
export function getWeatherAPI(deptId) {
    const url = `/ms/api/home/weather?deptId=${deptId}`
    return axios.get(url)
}

// 报警统计
export function getWarnCountAPI(deptId) {
    const url = `/ms/api/home/warn/list?deptId=${deptId}`
    return axios.get(url)
}

// 获取快捷菜单列表
export function getRuleFastByDeptIdAPI(deptId) {
    const url = `/ms/api/userRuleFast/getRuleFastByDeptId?deptId=${deptId}`
    return axios.get(url)
}

// 获取所有菜单
export function getAllRuleByDeptIdAPI(deptId) {
    const url = `/ms/api/userRuleFast/getAllRuleByUserId?deptId=${deptId}`
    return axios.get(url)
}

// 添加快捷菜单
export function addUserRuleFastAPI(params) {
    const url = `/ms/api/userRuleFast/addUserRuleFast`
    return axios.post(url, params)
}

//获取用户处理消息
export function getUserApprove(deptId) {
    const url = `/ms/api/msg/getNewApproveWithMe?deptId=${deptId}`
    return axios.get(url)
}